package cn.bx.bid.ctrl;


import cn.bx.bid.entity.Userrole;
import cn.bx.bid.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("Role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @RequestMapping(value = "findRoles",produces="application/json;charset=UTF-8")
    @ResponseBody
    public List<Userrole> findRoles(){
        List<Userrole> list = this.roleService.findALL();
        return list;
    }

}
